{extend name="shop/default/base" /}
{block name="resources"}
<link type="text/css" rel="stylesheet" href="__TEMP__/{$style}/public/css/payment_orders/payment_orders.css" />
<link type="text/css" rel="stylesheet" href="__TEMP__/{$style}/public/css/payment_orders/payment_orders_common.css" />
{/block}
{block name="main"}
<form>
<div class="cart-box">
	<div class="nb">
		<div class="cart-step">
			<ul>
				<li class="cart1"><i></i>购物车</li>
				<li class="cart2 oncart2"><i></i>确认订单</li>
				<li class="cart3"><i></i>付款</li>
				<li class="cart4"><i></i>支付成功</li>
			</ul>
		</div>
		<div class="add-deliver">
			<div class="cart-title">
				<h3>
					<span>收货人信息</span>
				</h3>
			</div>
			
			<div class="sh-address js-shipping-address">
				<ul>
					{foreach name = "address_list" item = "info" key = "k"}
					<li class="other-add {if condition='$info.is_default==1'}default-add{/if}" data-id="{$info.id}">
						<div class="add-box">
							<span class="remove vivi-blue js-shipping-address-remove" data-id="{$info.id}">X</span>
							<div class="name-add">
								<span class="name">{$info.consigner}</span>
								<span class="add-rside"></span>
							</div>
							<div class="elli add-detail">
								<p title="{$info.address}">{$info.address_info} {$info.address}</p>
							</div>
							<div>
								<span class="moblie">{$info.mobile}</span>
								<a href="javascript:void(0);" class="chang-default change vivi-blue js-update-shipping-address" data-id="{$info.id}">修改地址</a>
							</div>
						</div>
						<i class="icon-check"></i>
					</li>
					{/foreach}
					<li class="add-add">
						<div class="add-box add-box-center js-add-shipping-address">
							<a href="javascript:;"><i class="icon-add-add"></i>添加新地址</a>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="goods-infor">
			<div class="cart-title">
				<h3>
					<span>商品信息</span>
					<a href="SHOP_MAIN/member/cart.html" class="vivi-blue">返回购物车修改</a>
				</h3>
			</div>
			<div class="goods-table">
				<div class="goods-thead">
					<div class="col col1">商品</div>
					<div class="col col3">单价</div>
					<div class="col col4">数量</div>
					<div class="col col5">小计</div>
				</div>
				<div class="goods-tbody">
					{foreach name="list" item="cart_info" key="k"}
					<div class="goodinfor">
						<div class="col col1 goods-title-pic">
							<a  href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$cart_info.goods_id}">
								<img src="__UPLOAD__/{$cart_info.picture_info.pic_cover_small}" width="60" height="60">
							</a>
							<div class="goods-describ elli">
								<p>
									<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$cart_info.goods_id}">{$cart_info.goods_name}&nbsp;&nbsp;{$cart_info.sku_name}</a>
								</p>
								<p></p>
							</div>
						</div>
						<div class="col col3 goods-price">￥{$cart_info.price}</div>
						<div class="col col4 good-num">{$cart_info.num}</div>
						<div class="col col5 orange-bold xiaoji" data-subtotal="{$cart_info.price*$cart_info.num}" style="border-bottom-style: none;">￥{$cart_info.price*$cart_info.num}</div>
					</div>
					{/foreach}
				</div>
				
			</div>
		</div>

		<div class="style-zhifu">
			<div class="cart-title">
				<h3>
					<span>支付方式</span>
				</h3>
			</div>
			<div class="zhifu-box">
			
			{if condition="$shop_config['order_balance_pay'] == 1"}
				<div class="yue">
					<span><input type="checkbox" id="userbalance" disabled="disabled" style="display:none;">&nbsp;使用余额</span>
					<input type="text" maxlength="9" data-max="{$member_account.balance}" id="member_balance" style="display:inline-block;" />
					<span class="yeuse">（我的余额：<b class="orange-bold">{$member_account.balance}</b>元）</span>。<br> <br>
<!-- 					<p> -->
<!-- 						<span><input type="checkbox" id="userpoint" disabled="disabled">&nbsp;使用积分</span> -->
<!-- 						<input type="text" maxlength="9" id="point"> -->
<!-- 						<span class="yeuse">（我的积分：<b class="orange-bold">{$member_account.point}</b>个）</span> -->
<!-- 					</p> -->
<!-- 					<span id="setpaypwd" style="display:none;">为保障您的余额安全，请先<a href="javascript:void(0);" class="vivi-blue js-sett-pay-pwd">设置支付密码</a></span> -->
				</div>
			{/if}
				{if condition="count($coupon_list) >0"}
				<div class="discount" style="display: block;">
					<div class="h3dy">
						<h3 class="yhdyong">
							使用优惠抵用券<sup><?php echo count($coupon_list); ?></sup>
						</h3>
					</div>
					<div class="youhui-box" style="display:block;">
						<ul class="discount-ul js-use_coupon">
							{foreach name="coupon_list" item="coupon"}
							<li data-money="{$coupon['money']}" data-id="{$coupon['coupon_id']}">
								<div class="yh-top">
									<p class="fir white">￥<span>{$coupon['money']}</span></p>
<!-- 									<p class="white sec">[满500元减30元]</p> -->
<!-- 									<p class="thir"></p> -->
								</div>
								<div class="yh-cen">
									<p>
										<span>期限：</span>{$coupon['start_time']}至{$coupon['end_time']}
									</p>
								</div>
							</li>
							{/foreach}
						</ul>
<!-- 						<ul class="discount-ul nouse"> -->
<!-- 							<li> -->
<!-- 								<div class="yh-top"> -->
<!-- 									<p class="fir white"> -->
<!-- 										￥<span>30</span> -->
<!-- 									</p> -->
<!-- 									<p class="white sec">[满500元减30元]</p> -->
<!-- 									<p class="thir">2016-05-09至2016-05-19</p> -->
<!-- 								</div> -->
<!-- 								<div class="yh-cen"> -->
<!-- 									<p> -->
<!-- 										<span>商家：</span>限牛酷自营 -->
<!-- 									</p> -->
<!-- 								</div> -->
<!-- 							</li> -->
<!-- 						</ul> -->
					</div>
				</div>
				{/if}

			</div>
			<div class="zhifu-box">
				<ul class="zfb" id="paylist">
					{if condition="$pay_config['wchat_pay_config']['is_use']==1"}
					<li>
						<i class="icon-check-zf" style="display:block;"></i>
						<a href="javascript:void(0);" id="wchatpay" class="selected">
							<img src="__TEMP__/{$style}/public/images/payment_orders/wxpay_native.png">
							<span>微信支付</span>
						</a>
					</li>
					{/if}
					{if condition="$pay_config['ali_pay_config']['is_use']==1"}
					<li>
						<i class="icon-check-zf"></i>
						<a href="javascript:void(0);" id="alipay">
							<img src="__TEMP__/{$style}/public/images/payment_orders/alipay.png">
							<span>支付宝</span>
						</a>
					</li>
					{/if}
					{if condition="$shop_config['order_delivery_pay'] == 1"}
					<li>
						<i class="icon-check-zf"></i>
						<a href="javascript:void(0);" id="cash_on_delivery">
							<img src="__TEMP__/{$style}/public/images/payment_orders/cash_delivery.png">
							<span>货到付款</span>
						</a>
					</li>
					{/if}
				</ul>
			</div>
		</div>
		
		<div class="style-zhifu">
			<div class="cart-title">
				<h3>
					<span>配送方式</span>
				</h3>
			</div>
			<div class="zhifu-box">
				<ul class="zfb" id="expresslist">
					<li>
						<i class="icon-check-zf" style="display: block;"></i>
						<a href="javascript:void(0);" id="0" class="selected">商家配送</a>
					</li>
				</ul>
			</div>
		</div>
		
		<div class="style-zhifu order-invoice">
			<div class="cart-title">
				<h3>
					<span>发票信息</span>
				</h3>
			</div>
			<div class="zhifu-box">
				<div class="item">
					<div class="label">
						<ul class="zfb" id="is_invoice">
							<li>
								<i class="icon-check-zf" style="display: block;"></i>
								<a href="javascript:void(0);" data-flag="not-need-invoice" class="selected">不需要发票</a>
							</li>
							{if condition="count($shop_config.order_invoice_content_list)>0"}
							<li>
								<i class="icon-check-zf"></i>
								<a href="javascript:void(0);" data-flag="need-invoice">需要发票</a>
							</li>
							{/if}
						</ul>
					</div>
				</div>
				
				{if condition="count($shop_config.order_invoice_content_list)>0"}
				<div id="invoiceinfo" style="display: none;">
				
					<div class="item">
						<span class="label fl" style="line-height: 50px;">发票抬头：</span>
						<div class="fl">
							<ul class="zfb" id="invoice_tite_list">
								<li>
<!-- 									<i class="icon-check-zf" style="display: block"></i> class="selected"-->
									<a href="javascript:void(0);">
										<input type="text" placeholder="个人或公司发票抬头" maxlength="50" class="invoice-looked" />
									</a>
								</li>
							</ul>
						</div>
					</div>
					
					<div class="item">
						<span class="label fl" style="line-height: 50px;">发票内容：</span>
						<div class="fl">
							<ul class="zfb" id="invoice_con">
								{foreach name="$shop_config.order_invoice_content_list" item="invoice" key="k"}
								<li>
									<!-- {if condition="$k==0"}style="display: block"{/if} -->
									<i class="icon-check-zf"></i>
									<!-- {if condition="$k==0"}class="selected"{/if} -->
									<a href="javascript:void(0);" title="{$invoice}">{$invoice}</a>
								</li>
								{/foreach}
							</ul>
						</div>
					</div>
				</div>
				{/if}
			</div>
		</div>
		
		<div class="fare-result">
			<div class="cart-title">
				<h3>
					<span>结算信息</span>
				</h3>
			</div>
			<div class="result-box">
				<ul>
					<li class="first">
						<div class="calu-box">
							<p class="slivergrey">
								<span>共<b class="orange-bold js-goods-num">0</b>件商品 总计：</span>
								<span class="txtmoney">￥<b class="js-total-money">0.00</b></span>
							</p>
							<p class="slivergrey">
								<span>运费：</span>
								<span class="txtmoney">￥<b id="express">{$express}</b></span>
							</p>
							
							<p class="slivergrey">
								<span>总优惠：</span>
								<span class="txtmoney">￥<b id="discount_money">0.00</b></span>
							</p>
						</div>
					</li>
					<li>
						<div style="width: 400px; float: left; font-size: 14px;">
							<label class="list-name" for="leavemess">留言：</label>
							<textarea style="width: 90%; margin-top: 6px; height: 50px; vertical-align: top;" id="leavemessage" maxlength="200"></textarea>
						</div>
<!-- 						<div class="lside"> -->
<!-- 							<p class="save-passw"> -->
<!-- 								<span class="slivergrey">输入支付密码：</span> -->
<!-- 								<input type="password" id="cbkpaypwd"> -->
<!-- 							</p> -->
<!-- 						</div> -->
						<div class="rside">
							<div class="lside">
								<p>
									<span class="slivergrey">应付金额：</span>
									<span class="orange-bold big">￥<b id="realprice">0.00</b>
										{if condition="$count_point_exchange>0 "}<b>+{$count_point_exchange}积分</b>{/if}
									</span>
								</p>
								<p class="vivi-blue">提交订单后尽快支付，商品才不会被人抢走哦！</p>
							</div>
							<a href="javascript:void(0);" class="btn-jiesuan">提交订单</a>
							<input type="hidden" id="hidden_discount_money" value="{$discount_money}">
							<input type="hidden" id="hidden_express" value="{$express}">
							<input type="hidden" id="hidden_count_money" value="{$count_money}">
							<input type="hidden" id="is_calculate_express" value="{$is_calculate_express}">
							<input type="hidden" id="res_message" value="{$res_message}">
							<input type="hidden" id="count_point_exchange" value="{$count_point_exchange}"/>
							<input type="hidden" id="hidden_full_mail_money" value="{$promotion_full_mail.full_mail_money}"/>
							<input type="hidden" id="hidden_full_mail_is_open" value="{$promotion_full_mail.is_open}"/>
							<input type="hidden" id="goods_sku_list" value="{$goods_sku_list}" />
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>
</form>

<div id="mask" style="display: none;"></div>
<div class="pop-main pop-compare" style="display: none;">
	<div class="pop-header">
		<span>温馨提示</span>
		<a class="pop-close" href="javascript:;" title="关闭"></a>
	</div>
	<div class="pop-con">
		<i class="pop-icon"></i>
		<p class="pop-text">您确认要删除吗？</p>
		<a href="javascript:;" class="pop-sure main-bg-color">确定</a><a href="javascript:;" class="cancel-btn">取消</a>
	</div>
</div>

<div class="edit-address modbox" style="display: none;margin-left:-400px;">
	<div class="edit-box">
		<h3>新增收货地址信息<i class="close-modbox"></i></h3>
		<div class="edit-form">
			<ul>
				<li>
					<label><i>*</i>收货人：</label>
					<input type="text" id="consigner" maxlength="20" class="s-length">
				</li>
				<li>
					<label><i>*</i>手机号码：</label>
					<input type="text" id="mobile" maxlength="11" class="s-length">
				</li>
				<li>
					<label>固定电话：</label>
					<input type="text" id="phone" maxlength="20" class="s-length">
				</li>
				<li style="min-height: 25px;">
					<label style="width: 75px; float: left;"><i>*</i>所在地区：</label>
					<div class="deliver" style="float: left;">
						<div id="store-selector">
							{include file='shop/default/controlSelectAddress'/}
						</div>
					</div>
				</li>
				<li style="clear: both;">
					<label><i>*</i>详细地址：</label>
					<input type="text" id="detailed_address" maxlength="30" class="l-length">
				</li>
				<li style="clear: both;">
					<label>邮编：</label>
					<input type="text" id="zipcode" maxlength="30" class="l-length">
				</li>
			</ul>
			<input type="hidden" id="address_id" value="0">
			<button class="btn-save" id="save_shipping_address">保存</button>
		</div>
	</div>
</div>

<!-- <div id="edit-paypwd" class="modbox" style="display: none;margin-left:-305px;"> -->
<!-- 	<h3> -->
<!-- 		设置支付密码<i class="close-modbox"></i> -->
<!-- 	</h3> -->
<!-- 	<div> -->
<!-- 		<p> -->
<!-- 			<label>手机：</label> -->
<!-- 			<input type="text" id="mobile" readonly="readonly" style="width: 93px; border: none;"> -->
<!-- 			<input type="button" value="发送验证码" id="sendcode" data-mobileid="mobile" class="btn" onclick="sendSms(this, 'sms_setpaypwd');"> -->
<!-- 		</p> -->
<!-- 		<p> -->
<!-- 			<label>手机验证码：</label> -->
<!-- 			<input type="text" id="authcode" maxlength="8" class="input" onkeyup="onlyNum(this);"> -->
<!-- 		</p> -->
<!-- 		<p> -->
<!-- 			<label>设置支付密码：</label> -->
<!-- 			<input type="password" id="paypwd" maxlength="16" class="input"> -->
<!-- 			<span class="tip">限数字和字母，6到16个字符</span> -->
<!-- 		</p> -->
<!-- 		<p> -->
<!-- 			<label>再输支付密码：</label> -->
<!-- 			<input type="password" id="repaypwd" maxlength="16" class="input"> -->
<!-- 		</p> -->
<!-- 		<a href="javascript:void(0);" onclick="editPaypwd();" class="btn" style="margin-left: 94px; margin-top: 20px">提交</a> -->
<!-- 	</div> -->
<!-- </div> -->
<div class="order-pay-box modbox" style="display: none;margin-left:-175px;width:350px;">
	<div class="edit-box">
		<h3>提示<i class="close-modbox"></i></h3>
		<div class="edit-form">
			<div  class="pay-bottom-box">
				<h4 class="pay-h4">请在新打开的页面上完成付款</h4>
				<h5>付款完成前请不要关闭此窗口。</h5>
				<div style="clear:both;"></div>
				<div style="margin-top:20px;">
					<a class="pay-button f-l" href="SHOP_MAIN//member/orderlist.html">付款成功</a>
					<a class="pay-a" href="SHOP_MAIN//member/orderlist.html">付款失败</a>		
				</div>	
			</div>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script src="__TEMP__/{$style}/public/js/payment_orders/shipping_address.js"></script>
<script src="__TEMP__/{$style}/public/js/payment_orders/payment_orders.js"></script>
<!-- <script type="text/javascript"src="__TEMP__/{$style}/public/js/base.js"></script> -->
<!-- <script type="text/javascript"src="__TEMP__/{$style}/public/js/buyFlowSecondGetGoods/buyFlowSecondGetGoods.js"></script> -->
{/block}
